/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate.pojo;

/**
 * test pojo to test primitive properties and ID
 *
 * @hibernate.mapping auto-import="true" schema="SAMPLE"
 * @hibernate.class table="simple-table" schema="schema" proxy="foo.bar.baz"
 * discriminator-value="blurge" mutable="false"
 * polymorphism="explicit" where="bla bla" persister="goo"
 * dynamic-update="true" dynamic-insert="false"
 * batch-size="239" select-before-update="true"
 * optimistic-lock="version" lazy="true"
 * @hibernate.meta attribute="attribute" inherit="true" value="blurge"
 * @hibernate.comment This is comment
 * @hibernate.typedef name="TypeName1" class="EnumUserType"
 * @hibernate.typedef-param typedef-name="TypeName1" name="enumClassName" value="a.B"
 * @hibernate.typedef name="TypeName2" class="EnumUserType"
 * @hibernate.typedef-param typedef-name="TypeName2" name="enumClassName" value="a.C"
 *
 * @hibernate.filter-def name="regionlist" condition="a != b"
 * @hibernate.filter-param filterdef-name="regionlist" name="regions" type="string"
 * @hibernate.filter-def name="effectiveDate"
 * @hibernate.filter-param filterdef-name="effectiveDate" name="asOfDate" type="timestamp"
 *
 * @hibernate.filter name="seniorSalespersons" condition="hire_dt < :asOfDate"
 * @hibernate.sql-insert callable="foo" value="bar"
 * @hibernate.sql-update callable="foo" value="bar"
 * @hibernate.sql-delete callable="foo" value="bar"
 * @hibernate.sql-delete-all callable="foo" value="bar"
 */
public class Simple {
    private Object _fullBlown;
    private String _name;
    /**
     * property defined on field level
     *
     * @hibernate.property index="blam" node="glum"
     * @hibernate.meta attribute="attribute" inherit="true" value="blurge"
     */
    private int blurge;
    private long _id;
    private String typedProperty;

    public void setFullBlown(Object fullBlown) {
        _fullBlown = fullBlown;
    }

    /**
     * fully blown property. shall generate all the elements
     *
     * @hibernate.property column="foo-bar" length="235" not-null="true"
     * unique="true" insert="false" update="false" generated="true"
     * type="baz.bang.blurge" formula="gee"
     */
    public Object getFullBlown() {
        return _fullBlown;
    }

    public void setId(long id) {
        _id = id;
    }

    /**
     * @hibernate.id unsaved-value="yahoo" generator-class="native"
     * @hibernate.generator-param name="param" value="22"
     * @hibernate.column name="blurge" sql-type="foobar" comment="This is column comment"
     * @hibernate.meta attribute="attribute" inherit="true" value="blurge"
     */
    public long getId() {
        return _id;
    }

    /**
     * just default property, shall generate just name
     *
     * @hibernate.property
     */
    public String getName() {
        return _name;
    }

    void setName(String name) {
        _name = name;
    }

    /**
     * @hibernate.property
     * @hibernate.type name="com.bar.Foo"
     * @hibernate.type-param name="something" value="whatever"
     */
    public String getTypedProperty() {
        return typedProperty;
    }

    public void setTypedProperty(String typedProperty) {
        this.typedProperty = typedProperty;
    }
}